import request from '@/utils/request'

// 查询充值记录列表
export function listRecords(query) {
    return request({
        url: '/order/records/list',
        method: 'get',
        params: query
    })
}

// 查询充值记录详细
export function getRecords(id) {
    return request({
        url: '/order/records/' + id,
        method: 'get'
    })
}

// 新增充值记录
export function addRecords(data) {
    return request({
        url: '/order/records',
        method: 'post',
        data: data
    })
}

// 修改充值记录
export function updateRecords(data) {
    return request({
        url: '/order/records',
        method: 'put',
        data: data
    })
}

// 删除充值记录
export function delRecords(id) {
    return request({
        url: '/order/records/' + id,
        method: 'delete'
    })
}
export function recordsQuery(data) {
    return request({
        url: '/order/records/query',
        method: 'post',
        data: data
    })
}
export function queryByOrderIds(data) {
    return request({
        url: '/order/records/queryByOrderIds',
        method: 'post',
        data: data
    })
}

export function recordsRefund(data) {
    return request({
        url: '/order/records/refund',
        method: 'post',
        data: data
    })
}

export function consumptionRefund(data) {
    return request({
        url: '/order/consumption/refund',
        method: 'post',
        data: data
    })
}